Pen state detection circuit and pen state detection method

ABSTRACT

A pen state detection circuit that is connected to a touch sensor of a capacitance type and adapted to detect a state of an electronic pen in accordance with an output signal from the touch sensor. The touch sensor includes sensor electrodes disposed in a planar manner, and the electronic pen includes a first electrode and a second electrode. The pen state detection circuit includes a processor configured to sequentially and repeatedly: acquire first and second coordinate values in a sensor coordinate system, the coordinate system being defined on a detection surface of the touch sensor, the first coordinate values indicating a projected position of the first electrode, the second coordinate values indicating a projected position of the second electrode; calculate an inclination value indicative of an inclination of the electronic pen from the acquired first and second coordinate values in accordance with calculation rules; and output the inclination value.

BACKGROUND Technical Field

The present disclosure relates to a pen state detection circuit and apen state detection method.

Background Art

An electronic device disclosed in Japanese Patent Laid-open No.2015-087785 detects a first position, which is a position on a detectionsurface of a touch sensor that is touched by a hand of a user, detects asecond position, which is a position indicated by an electronic pen,estimates a direction of inclination of the electronic pen by usingcoordinate values of the first and second positions, and corrects theposition indicated by the electronic pen in accordance with theestimated direction of inclination.

Incidentally, even in a case where the hand of the user is not incontact with the detection surface, a position and a posture of theelectronic pen can be estimated by using an electronic pen having twoelectrodes. However, the two electrodes are disposed at a physicaldistance from each other. Therefore, there are some cases where, forexample, at a periphery or a bend of the touch sensor, only a projectedposition of one electrode is not detected or a detected projectedposition is deviated from an actual projected position. Consequently,unexpected calculation results regarding the state of the electronic penare outputted.

BRIEF SUMMARY

The present disclosure has been made in view of the above circumstances,and provides a pen state detection circuit and a pen state detectionmethod that make it possible to inhibit unexpected results from beingobtained from a periphery or a bend of a touch sensor when theinclination of an electronic pen having two electrodes is calculated.

According to a first aspect of the present disclosure, there is provideda pen state detection circuit that is connected to a touch sensor of acapacitance type and adapted to detect a state of an electronic pen inaccordance with an output signal from the touch sensor, the touch sensorincluding a plurality of sensor electrodes disposed in a planar manner,the electronic pen including a first electrode and a second electrode,the pen state detection circuit including: a processor; and a memorystoring instructions that, when executed by the processor, cause the penstate detection circuit to sequentially and repeatedly: acquire firstcoordinate values and second coordinate values in a sensor coordinatesystem, the coordinate system being defined on a detection surface ofthe touch sensor, the first coordinate values indicating a projectedposition of the first electrode, the second coordinate values indicatinga projected position of the second electrode; calculate an inclinationvalue indicative of an inclination of the electronic pen from the firstcoordinate values and second coordinate values in accordance withcalculation rules; and output the inclination value, in which, while theinclination value is sequentially and repeatedly calculated andoutputted, an inclination value outputted when decision conditions aresatisfied is different from an inclination value calculated inaccordance with ordinary calculation rules when the decision conditionsare not satisfied, the decision conditions representing a situationwhere at least one of the first and second electrodes is potentially ina position interfering with a periphery or a bend of the touch sensor asviewed from above the detection surface.

According to a second aspect of the present disclosure, there isprovided a pen state detection method performed by a pen state detectioncircuit, the pen state detection circuit being connected to a touchsensor of a capacitance type and adapted to detect a state of anelectronic pen in accordance with an output signal from the touchsensor, the touch sensor including a plurality of sensor electrodesdisposed in a planar manner, the electronic pen including a firstelectrode and a second electrode, the method including sequentially andrepeatedly: acquiring first coordinate values and second coordinatevalues in a sensor coordinate system, the coordinate system beingdefined on a detection surface of the touch sensor, the first coordinatevalues indicating a projected position of the first electrode, thesecond coordinate values indicating a projected position of the secondelectrode; calculating an inclination value indicative of an inclinationof the electronic pen from the first coordinate values and secondcoordinate values in accordance with calculation rules; and outputtingthe inclination value, in the calculating and outputting, an inclinationvalue outputted when decision conditions are satisfied being differentfrom an inclination value that is calculated in accordance with ordinarycalculation rules when the decision conditions are not satisfied, thedecision conditions representing a situation where at least one of thefirst and second electrodes is potentially in a position interferingwith a periphery or a bend of the touch sensor as viewed from above thedetection surface.

According to a third aspect of the present disclosure, there is provideda pen state detection circuit that is connected to a touch sensor of acapacitance type and adapted to detect a state of an electronic pen inaccordance with an output signal from the touch sensor, the touch sensorincluding a plurality of sensor electrodes disposed in a planar manner,the electronic pen including a first electrode and a second electrode,the pen state detection circuit including: a processor; and a memorystoring instructions that, when executed by the processor, cause the penstate detection circuit to sequentially and repeatedly: acquire firstcoordinate values and second coordinate values in a sensor coordinatesystem, the coordinate system being defined on a detection surface ofthe touch sensor, the first coordinate values indicating a projectedposition of the first electrode, the second coordinate values indicatinga projected position of the second electrode; calculate an inclinationvalue indicative of an inclination of the electronic pen from the firstcoordinate values and second coordinate values in accordance withcalculation rules, and output the inclination value, wherein time-seriesinclination values sequentially outputted when the electronic pen ispositioned at a periphery of the touch sensor during the movement of theelectronic pen are smoothed to a greater extent than time-seriesinclination values sequentially outputted when the electronic pen ispositioned at a central portion of the touch sensor.

According to a fourth aspect of the present disclosure, there isprovided a pen state detection circuit that is connected to a touchsensor of a capacitance type and adapted to detect a state of anelectronic pen in accordance with an output signal from the touchsensor, the touch sensor including a plurality of sensor electrodesdisposed in a planar manner, the electronic pen including a firstelectrode and a second electrode, the pen state detection circuitincluding: a processor; and a memory storing instructions that, whenexecuted by the processor, cause the pen state detection circuit tosequentially and repeatedly: acquire first coordinate values and secondcoordinate values in a sensor coordinate system, the coordinate systembeing defined on a detection surface of the touch sensor, the firstcoordinate values indicating a projected position of the firstelectrode, the second coordinate values indicating a projected positionof the second electrode; calculate an inclination value indicative of aninclination of the electronic pen from the first coordinate values andsecond coordinate values in accordance with calculation rules; andoutput the inclination value, wherein time-series inclination valuessequentially outputted when the electronic pen is positioned at a bendof the touch sensor during the movement of the electronic pen are moresmoothed than time-series inclination values sequentially outputted whenthe electronic pen is positioned at a flat portion of the touch sensor.

One or more aspects of the present disclosure make it possible toinhibit unexpected results from being obtained from a periphery or abend of a touch sensor when the inclination of an electronic pen havingtwo electrodes is calculated.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram illustrating an example of an input systemincorporating a pen state detection circuit according to a firstembodiment of the present disclosure;

FIG. 2 is a schematic diagram illustrating a part of an electronic pendepicted in FIG. 1;

FIGS. 3A and 3B are diagrams illustrating examples of signaldistributions that are obtained when the electronic pen is in a contactstate;

FIG. 4 is a schematic side cross-sectional view illustrating anelectronic device depicted in FIG. 1;

FIG. 5 is a diagram illustrating an exemplary diagram of a sensor regionof a touch sensor;

FIG. 6 is a block diagram illustrating a pen detection function of atouch IC depicted in FIG. 1;

FIG. 7 is a flowchart illustrating execution of a pen detection functiondepicted in FIG. 4;

FIG. 8 is a diagram illustrating exemplary combinations of decisionconditions and calculation methods;

FIGS. 9A and 9B are diagrams illustrating a first exemplary result ofinclination angle calculation;

FIGS. 10A and 10B are diagrams illustrating a second exemplary result ofinclination angle calculation;

FIG. 11 is a diagram illustrating an example of an input system forperforming a pen pressure value output method according to a secondembodiment of the present disclosure;

FIG. 12 is a block diagram illustrating a pen detection function of thetouch IC depicted in FIG. 11;

FIG. 13 is a flowchart illustrating execution of the pen detectionfunction depicted in FIG. 12;

FIG. 14 is a schematic diagram illustrating a part of the electronic pendepicted in FIG. 11;

FIG. 15 is a diagram illustrating an example of a pen pressurecorrection property used for correcting a pen pressure value;

FIG. 16 is another flowchart illustrating a case where the electronicpen corrects the pen pressure value;

FIG. 17 is a diagram illustrating an example of an input systemincorporating the pen state detection circuit according to a thirdembodiment of the present disclosure;

FIG. 18 is a block diagram illustrating a pen detection function of thetouch IC depicted in FIG. 17;

FIG. 19 is a flowchart illustrating execution of the pen detectionfunction depicted in FIG. 18;

FIG. 20 is a schematic side cross-sectional view illustrating anelectronic device depicted in FIG. 17;

FIGS. 21A and 21B are diagrams illustrating exemplary methods ofdividing the sensor region;

FIGS. 22A and 22B are diagrams illustrating a first exemplary result ofa scan region determination;

FIGS. 23A and 23B are diagrams illustrating a second exemplary result ofa scan region determination;

FIGS. 24A and 24B are diagrams illustrating a third exemplary result ofa scan region determination; and

FIGS. 25A and 25B are diagrams illustrating an example of an alternativescanning operation performed by a scan control circuit.

DETAILED DESCRIPTION

A pen state detection circuit and a pen state detection method, whichare provided by the present disclosure, will now be described withreference to the accompanying drawings. The present disclosure is notlimited to embodiments and modifications described below. It is obviousthat the embodiments and modifications described below may be freelychanged without departing from the spirit and scope of the presentdisclosure. Alternatively, various configurations may be combined asappropriate without causing technical inconsistencies.

First Embodiment

A pen state detection circuit and a pen state detection method accordingto a first embodiment of the present disclosure are described below withreference to FIGS. 1 to 10B.

<Overall Configuration of Input System 10>

FIG. 1 is a diagram illustrating an example of an input system 10incorporating the pen state detection circuit according to the firstembodiment of the present disclosure. The input system 10 includes anelectronic device 12 and an electronic pen 14 (referred to also as a“stylus”). The electronic device 12 has a touch panel display. Theelectronic pen 14 is a pen-shaped pointing device.

The electronic device 12 is formed, for example, of a tablet terminal, asmartphone, or a personal computer. A user holding the electronic pen 14with one hand is able to write pictures and characters on the electronicdevice 12 by pressing a tip of the electronic pen 14 on a detectionsurface 16 of the electronic device 12 and moving the tip of theelectronic pen 14 as desired. Further, the user is able to perform adesired operation through a displayed user control by placing a finger Fof the user into contact with the detection surface 16.

The electronic device 12 includes a touch sensor 18, a touch integratedcircuit (IC) 20, and a host processor 22. The touch IC 20 functions asthe pen state detection circuit. The touch sensor 18 is formed bycombining a plurality of electrodes disposed on a display panel (notdepicted). The touch sensor 18 includes a plurality of sensor electrodes18 x for detecting a position on an X-axis and a plurality of sensorelectrodes 18 y for detecting a position on a Y-axis. The x-directionand the y-direction depicted in FIG. 1 respectively correspond to theX-axis and the Y-axis of an orthogonal coordinate system defined on thedetection surface 16 formed by the touch sensor 18.

The sensor electrodes 18 x, which are each shaped like a belt andextended in the y-direction, are disposed at equal intervals in thex-direction. The sensor electrodes 18 y, which are each shaped like abelt and extended in the x-direction, are disposed at equal intervals inthe y-direction. The intervals at which the sensor electrodes 18 x (orthe sensor electrodes 18 y) are disposed may be hereinafter expressed byusing the word “pitch.” As a substitute for a mutual-capacitive sensordescribed above, a self-capacitive sensor formed of block-shapedelectrodes disposed in a two-dimensional grid pattern may be used as thetouch sensor 18.

The touch IC 20 is an integrated circuit that includes a microcontroller24 having a processor 26 and a memory 28, wherein the processor 24capable of executing firmware (e.g., instructions) stored in the memory24, and is connected to the sensor electrodes 18 x and 18 y included inthe touch sensor 18. The microcontroller 24 is capable of implementing atouch detection function and a pen detection function. Themicrocontroller 24 performing the touch detection function detects atouch, for example, by the finger F of the user. The microcontroller 24performing the pen detection function detects the state of theelectronic pen 14.

The touch detection function includes, for example, a function forscanning the touch sensor 18, a function for creating a heat map(two-dimensional distribution of detection levels) on the touch sensor18, and a function for classifying regions on the heat map (e.g.,classification of fingers F and palms of hands). The pen detectionfunction includes, for example, a function for scanning the touch sensor18 (global scan or sector scan), a function for receiving and analyzinga downlink signal, a function for estimating a state of the electronicpen 14 (e.g., position, inclination, and pen pressure), and a functionfor generating and transmitting an uplink signal including a command forthe electronic pen 14.

The host processor 22 includes a central processing unit (CPU) or agraphics processing unit (GPU). The host processor 22 reads a programfrom a memory (not depicted) and executes the read program to therebyperform a process of generating digital ink by using data from the touchIC 20 and a rendering process for displaying a drawing indicated by thedigital ink, for example.

<Pen State Estimation Method>

FIG. 2 is a schematic diagram illustrating a part of the electronic pen14 depicted in FIG. 1. The electronic pen 14 includes a tip electrode 30and an upper electrode 32. The tip electrode 30, which is conical inshape, is symmetrically shaped with respect to a central axis of theelectronic pen 14 and disposed on the tip of the electronic pen 14. Theupper electrode 32, which is tapered and annular (e.g., frustoconical)in shape, is symmetrically shaped with respect to the axis of theelectronic pen 14 and disposed closer to a base end than the tipelectrode 30.

The tip electrode 30 and the upper electrode 32 output signals(so-called downlink signals) generated by an oscillator circuit 34. Asthe oscillator circuit 34 changes an oscillation frequency or changes adestination in a time-division manner, the electronic pen 14 is able tooutput two different downlink signals through the tip electrode 30 andthe upper electrode 32, respectively.

The touch IC 20 (FIG. 1) in the electronic device 12 acquires, from thetouch sensor 18, a signal distribution (hereinafter referred to as a“first signal distribution”) indicative of a change in capacitance (morespecifically, mutual-capacitance or self-capacitance) that occurs whenthe tip electrode 30 is in proximity to the touch sensor 18. The firstsignal distribution is typically shaped to have one peak at a positionQ1. The position Q1 corresponds to a position where an apex (positionP1) of the tip electrode 30 is projected onto the detection surface 16.

Similarly, the touch IC 20 (FIG. 1) in the electronic device 12acquires, from the touch sensor 18, a signal distribution (hereinafterreferred to as a “second signal distribution”) indicative of a change incapacitance that occurs when the upper electrode 32 is in proximity tothe touch sensor 18. The second signal distribution is typically shapedto have one or two peaks at a position Q2. The position Q2 correspondsto a position where a shoulder (position P2) of the upper electrode 32is projected onto the detection surface 16. A position P3, which will bedescribed later, corresponds to a center of an upper base of the upperelectrode 32.

FIGS. 3A and 3B are diagrams illustrating examples of signaldistributions that are obtained when the electronic pen 14 is in acontact state. More specifically, FIG. 3A illustrates the first signaldistribution, and FIG. 3B illustrates the second signal distribution. InFIGS. 3A and 3B, the horizontal axis of each graph represents a relativeposition (unit: millimeters) with respect to an indicated positionindicated by the electronic pen 14, and the vertical axis of each graphrepresents a signal value (unit: none) normalized to [0,1]. For thesignal value, positive and negative signs are defined in such a mannerthat the signal value is “positive” when the electronic pen 14 is inproximity to the touch sensor 18. The first signal distribution and thesecond signal distribution both vary in shape depending on theinclination of the electronic pen 14 (hereinafter referred to also as“pen inclination”). In FIGS. 3A and 3B, three curves obtained by varyingthe pen inclination are depicted in an overlapping manner.

As depicted in FIG. 3A, the shapes of the first signal distribution aresubstantially similar to each other irrespective of the pen inclination.The reason is that, while the electronic pen 14 is used, the apex of thetip electrode 30 is usually closest to the detection surface 16 to makethe position Q1 substantially coincide with the position P1. Meanwhile,as depicted in FIG. 3B, the second signal distribution is such that theposition of a peak or the number of peaks significantly varies withchanges in the pen inclination. The reason is that, while the electronicpen 14 is used, either one of the shoulders of the upper electrode 32 isusually closest to the detection surface 16 to make the distance betweenthe positions Q1 and Q2 vary with the pen inclination.

The position and the posture of the electronic pen 14 can be estimatedby using the coordinates of the positions Q1 and Q2. For example, theindicated position corresponds to the position Q1 depicted in FIG. 2.The pen inclination corresponds to an angle (hereinafter referred to asan “inclination angle θ”) between a direction that is perpendicular tothe detection surface 16 and the axis of the electronic pen 14. Morespecifically, θ=0° in a state where the pen inclination is perpendicularto the detection surface 16, and θ=90° in a state where the peninclination is parallel to the detection surface 16. As a physicalquantity indicative of the inclination of the electronic pen 14, anorientation indicative of the “direction” of inclination may be usedinstead of an angle indicative of the “magnitude” of inclination.

FIG. 4 is a schematic side cross-sectional view illustrating theelectronic device 12 depicted in FIG. 1. Linearly disposed rectanglesschematically represent the sensor electrodes 18 x and 18 y (FIG. 1),which are arrayed in a planar manner. In the example of FIG. 4, theelectronic device 12, which is flat, is folded into halves in such amanner that the detection surface 16 faces outwardly while anon-detection surface 40 faces inwardly. This enables the user toperform input operations by using the electronic pen 14 and the finger Feven in a state where the electronic device 12 is folded.

As the tip electrode 30 and upper electrode 32 of the electronic pen 14are disposed at a physical distance from each other, there may arise asituation where the positions Q1 and Q2 are not correctly detecteddepending on the relative positional relationship between the electronicpen 14 and the touch sensor 18. The situation may arise, for example,[1] when only the position Q2 is left undetected at a periphery 42, [2]when the accuracy of detection of the positions Q1 and Q2 is lowered dueto electromagnetic wave interference caused at a periphery 44 byelectronic parts 45 including a camera unit, and [3] when the positionQ2 is occasionally left undetected at a bend 46.

Stated differently, a problem occurs so that unexpected calculationresults regarding the state of the electronic pen 14 are outputted whenthe positions Q1 and Q2 are left undetected or when the detectedpositions Q1 and Q2 are deviated from actual projected positions.Therefore, a pen state detection method is proposed to address the aboveproblem. The proposed pen state detection method inhibits unexpectedcalculation results from being obtained from the peripheries 42 and 44or the bend 46 of the touch sensor 18 when the inclination of theelectronic pen 14 including the tip electrode 30 and the upper electrode32 is calculated.

<Operation of Touch IC 20>

FIG. 5 is a diagram illustrating an exemplary diagram of a sensor region50 of the touch sensor 18. An adopted sensor coordinate system is atwo-dimensional orthogonal coordinate system that has an origin O, anX-axis, and a Y-axis. The origin O is a feature point (e.g., upper leftvertex) on the detection surface 16. An X-Y plane coincides with theplanar direction of the detection surface 16. The sensor region 50includes at least one of a peripheral region 52 corresponding to theperiphery 42 (FIG. 4), a peripheral region 54 corresponding to theperiphery 44 (FIG. 4), and a bend region 56 corresponding to the bend 46(FIG. 4). The remaining portion of the sensor region 50 is a generalregion 58 that corresponds to a flat general section 48 depicted in FIG.4. The shape of each region (e.g., width, position, and size) can bevariously set depending on the electronic device 12 or the electronicpen 14.

FIG. 6 is a block diagram illustrating the pen detection function of thetouch IC 20 depicted in FIG. 1. The pen detection function isimplemented by a signal acquisition circuit 60, a peak estimationcircuit 62, an inclination value calculation circuit 64, and acoordinate value calculation circuit 66. The functions of the signalacquisition circuit 60, peak estimation circuit 62, inclination valuecalculation circuit 64, coordinate value calculation circuit 66 may beperformed by the processor 26 while processor 26 executes instructionsstored in the memory 28. An operation performed by the touch IC 20 whilethe processor 26 executes instructions stored in the memory 28 toperform the pen detection function will now be described with referenceto the flowchart of FIG. 7.

At S1 of FIG. 7, the signal acquisition circuit 60 acquires the firstsignal distribution and the second signal distribution from the touchsensor 18 through a scanning operation performed on each of the sensorelectrodes 18 x and 18 y. Each of the signal distributions may be aone-dimensional signal distribution along the X- or Y-axis or atwo-dimensional signal distribution on the X-Y axis plane.

At S2, the peak estimation circuit 62 estimates a peak of the firstsignal distribution acquired at S1. More specifically, the peakestimation circuit 62 creates a curve by performing interpolation orapproximation of the first signal distribution, which is discrete, andcalculates first coordinate values corresponding to a peak of thecreated curve. Similarly, the peak estimation circuit 62 creates a curveby performing interpolation or approximation of the second signaldistribution, which is discrete, and calculates second coordinate valuescorresponding to a peak of the created curve. The “first coordinatevalues” indicate a projected position of the tip electrode 30(hereinafter referred to as a “first position”), and the “secondcoordinate values” indicate a projected position of the upper electrode32 (hereinafter referred to as a “second position”).

At S3, the inclination value calculation circuit 64 acquires decisionparameters necessary for later-described decision. The decisionparameters may be, for example, parameters for identifying the positionand the shape of the peripheral regions 52 and 54 or the bend region 56(FIG. 5) or parameters for identifying the state of the electronic pen14.

At S4, the inclination value calculation circuit 64 uses the first orsecond coordinate values acquired at S2 and the decision parametersacquired at S3 to determine whether or not predetermined decisionconditions are satisfied. The “decision conditions” represent asituation where at least one of the tip electrode 30 and the upperelectrode 32 is potentially in a position interfering with theperipheries 42 and 44 or the bend 46 as viewed from above the detectionsurface 16.

FIG. 8 is a diagram illustrating exemplary combinations of decisionconditions and calculation methods. “First conditions A” represent asituation where (1) the first position is at the general section 48 and(2) the second position is at the periphery 42. In other words, it isdetermined that the first conditions A are satisfied when (1) the firstcoordinate values indicate a position in the general region 58 and (2)the second coordinate values indicate a position in the peripheralregion 52.

“First conditions B” represent a situation where (1) the first positionhas moved outwardly from the inside of the touch sensor 18 and (2) thesecond position is at the periphery 42. In other words, it is decidedthat the first conditions B are satisfied when (1) the first coordinatevalues indicate an outward movement from the inside of the sensor region50 and (2) the second coordinate values indicate a position in theperipheral region 52.

“Second conditions” represent a situation where (1) the first positionis detected and (2) the second position is not detected. In other words,it is decided that the second conditions are satisfied when (1) thefirst coordinate values can be acquired and (2) the second coordinatevalues cannot be acquired.

A “third condition” represents a situation where the first position orthe second position is at a specific periphery 44. In other words, it isdecided that the third condition is satisfied when at least one of apair of the first coordinate values and a pair of the second coordinatevalues indicates a position in the peripheral region 54.

“Fourth conditions A” represent a situation where (1) the first orsecond position is at the bend 46 and (2) the bend 46 forms a protrudeddetection surface 16. In other words, it is decided that the fourthconditions A are satisfied when (1) at least one of a pair of the firstcoordinate values and a pair of the second coordinate values indicates aposition in the bend region 56 and (2) a flag value regarding the benddirection of the bend region 56 indicates an “upward protrusion.”

“Fourth conditions B” represent a situation where (1) the first orsecond position is at the bend 46 and (2) the bend 46 forms a recesseddetection surface 16. In other words, it is decided that the fourthconditions B are satisfied when (1) at least one of a pair of the firstcoordinate values and a pair of the second coordinate values indicates aposition in the bend region 56 and (2) the flag value regarding the benddirection of the bend region 56 indicates a “downward protrusion.”

For decision purposes, the inclination value calculation circuit 64 maydefine and use additional conditions representing “a situation where theelectronic pen 14 is in a contact state” in addition to the plurality ofsets of above-mentioned decision conditions. The “contact state” is astate where the tip electrode 30 of the electronic pen 14 is in contactwith the detection surface 16 of the electronic device 12. Conversely, a“hover state” is a state where the tip electrode 30 of the electronicpen 14 is not in contact with the detection surface 16 of the electronicdevice 12. In a case where, for example, the electronic pen 14 includesa pen pressure sensor 38 (FIG. 14), the touch IC 20 is able to identifythe above-mentioned two states by analyzing a downlink signaltransmitted from the electronic pen 14.

If none of the plurality of sets of predetermined decision conditions issatisfied (“NO” at S4), processing proceeds to S5. Meanwhile, if one ofthe plurality of sets of predetermined decision conditions is satisfied(“YES” at S4), processing proceeds to S6.

At S5, the inclination value calculation circuit 64 calculates aninclination value (hereinafter referred to as “ordinary calculatedvalue”) indicative of current pen inclination in accordance withordinary calculation rules, which use the first and second coordinatevalues currently acquired at S2. The “ordinary calculation rules” arerules for calculating the inclination value based on a geometric modelthat is established on an assumption that the detection surface 16 isflat. More specifically, in a case where the distance between thepositions P1 and P3 is H and the distance between the positions Q1 andQ2 is D, the inclination value calculation circuit 64 calculates aninclination angle θ in accordance with

Equation (1) below, where DO is the distance between the positions Q1and Q2 when θ=0 [degree].

θ=sin^(−l)(D/H)−sin^(−l)(D0/H)  (1)

Meanwhile, at S6, the inclination value calculation circuit 64calculates the inclination value in accordance with calculation rules(hereinafter referred to as “special calculation rules”) different fromthe ordinary calculation rules used at S5. In other words, theinclination value calculation circuit 64 calculates a value differentfrom the “ordinary calculated value,” which is calculated from thecurrently acquired first and second coordinate values in accordance withthe ordinary calculation rules.

If the first conditions A, the first conditions B, the third condition,or the fourth conditions B in FIG. 8 are satisfied, the inclinationvalue calculation circuit 64 obtains the ordinary calculated value in asimilar manner as at S5, and then corrects the obtained ordinarycalculated value. More specifically, the inclination value calculationcircuit 64 outputs a weighted sum of a currently calculated inclinationvalue and one or more previously calculated inclination values (e.g.,calculated at the nth last time point; n is a natural number).

If, for example, the inclination angle indicated by the last outputtedinclination value (hereinafter referred to as a “last inclinationvalue”) is θprv, and the indication angle indicated by the ordinarycalculated value is θcal, the inclination value calculation circuit 64calculates the inclination angle θ in accordance with Equation (2)below.

θ=(1−α)×θcal+α×θprv  (2)

A coefficient α in the above equation is a positive value satisfying0<α<1, and corresponds to a parameter representing the level ofsmoothing. In other words, the greater the value of the coefficient αis, the higher the level of smoothing is, whereas the smaller the valueof the coefficient α is, the lower the level of smoothing is.

If the second conditions are satisfied, the inclination valuecalculation circuit 64 outputs an inclination value that is obtainedearlier than the current inclination value. More specifically, if θprvis the latest valid value, the inclination value calculation circuit 64calculates the inclination angle θ in such a manner that θ=θprv. Thisequation coincides with Equation (2) if α=1.

If the fourth conditions B are satisfied, the inclination valuecalculation circuit 64 outputs an inclination value indicating that theelectronic pen 14 is perpendicular to the detection surface 16. Morespecifically, the inclination value calculation circuit 64 calculatesthe inclination angle θ in such a manner that θ=0. When the position ofthe bend 46 is identifiable in a case where the touch sensor 18 can bebent or curved at two or more points, the inclination value calculationcircuit 64 may decide whether fourth conditions A or B are satisfiedonly with regard to the bend region 56 including the position of thebend 46.

At S7, the coordinate value calculation circuit 66 corrects theindicated position indicated by the electronic pen 14 (i.e., firstcoordinate values) by using the inclination value calculated at S5 orS6. This reduces the displacement of the indicated position that isbased on the inclination angle θ. The pen detection function may usethis inclination value to correct a state value (e.g., pen pressurevalue) other than the indicated position.

At S8, the microcontroller 24 performing the pen detection functionsupplies data including state values (more specifically, coordinatevalues, inclination value, pen pressure value, etc.) indicative of thestate of the electronic pen 14 to the host processor 22. In this manner,the flowchart of FIG. 7 ends. The touch IC 20 is able to detect temporalchanges in the state of the electronic pen 14 by performing the processshown in this flowchart successively at predetermined time intervals.Exemplary results of calculation of the inclination angle θ aredescribed below with reference to FIGS. 9A and 9B and FIGS. 10A and 10B.

FIG. 9A is a diagram illustrating a first behavior of the electronic pen14. Let us assume a case where, for example, the user swings theelectronic pen 14 in the left-right direction around a fixation point onthe detection surface 16 at which the tip of the electronic pen 14 isfixed. The width and the cycle of the swing are assumed to be constantirrespective of the position of the fixation point.

FIG. 9B is a diagram illustrating temporal changes in the inclinationangle θ that is successively calculated based on the first behavior. Thehorizontal axis of a graph in FIG. 9B represents time (unit: seconds),whereas the vertical axis of the graph represents the inclination angleθ (unit: degrees). A solid-line curve G1 corresponds to the inclinationangle θ calculated when the fixation point is at the general section 48,that is, the inclination angle θ calculated in accordance with theordinary calculation rules. Meanwhile, a broken-line curve G2corresponds to the inclination angle θ calculated when the fixationpoint is at the periphery 42, that is, the inclination angle θcalculated in accordance with the special calculation rules (“firstconditions A” in FIG. 8). A curve G3 corresponds to an actual value ofthe inclination angle θ.

As is understandable from FIG. 9B, the behaviors indicated by the curvesG1 to G3 vary in substantially the same cycle around θ=0 [degree]. Thecurve G1 has substantially the same shape as the curve G3. However, thecurve G2 is shaped in such a manner as to indicate a narrower range ofthe inclination angle θ than the curve G1. In other words, thetime-series of the inclination angle θ is smoothed by using the specialcalculation rules.

FIG. 10A is a diagram illustrating a second behavior of the electronicpen 14. Let us assume a case where, for example, the user moves theelectronic pen 14 in such a manner as to pass the bend 46 having anL-shaped curve. The detection surface 16 of the electronic device 12 isassumed to have a downwardly protrusion, L-shaped curve at the bend 46.

FIG. 10B is a diagram illustrating temporal changes in the inclinationangle θ that is successively calculated based on the second behavior.The horizontal axis of a graph in FIG. 10B represents time (unit:seconds), whereas the vertical axis of the graph represents theinclination angle θ (unit: degrees). A solid-line curve G1 indicates acomparative example, a broken-line curve G2 indicates an exemplaryembodiment, and a thick solid-line curve G3 indicates an actual value.The “comparative example” corresponds to a case where only the ordinarycalculation rules are applied. The “exemplary embodiment” corresponds toa case where the ordinary calculation rules and the special calculationrules (“fourth conditions B” in FIG. 8) are applied.

As indicated by the curve G3, the user tends to perform a writingoperation with the electronic pen 14 brought into perpendicular contactwith the detection surface 16 in order to prevent the tip of theelectronic pen 14 from slipping at the bend 46 having a curved recessedsurface. In such an instance, the position Q2 is occasionally leftundetected at the bend 46 as indicated by the curve G1 (comparativeexample) so that a quasi-state where the electronic pen 14 is suddenlyinclined may be detected. In view of such circumstances, the calculationrules suitable for the bend 46 are applied as indicated by the curve G2(exemplary embodiment). This partially smooths the time-series of theinclination angle θ. Consequently, obtained calculation results indicatea behavior close to the actual behavior of the electronic pen 14.

Summary of First Embodiment

As described above, the touch IC 20 is a pen state detection circuitthat is connected to the touch sensor 18 of a capacitance type andadapted to detect the state of the electronic pen 14 in accordance withan output signal from the touch sensor 18. The touch sensor isconfigured such that the plurality of sensor electrodes 18 x and 18 yare disposed in a planar manner. The electronic pen 14 includes the tipelectrode 30 (first electrode) and the upper electrode 32 (secondelectrode). The touch IC 20 sequentially and repeatedly performs anacquisition act (S2) and an inclination output act (including S5, S6,and S8). The acquisition act acquires the first coordinate valuesindicating the projected position of the tip electrode 30 and the secondcoordinate values indicating the projected position of the upperelectrode 32, which are in a sensor coordinate system defined on thedetection surface 16 of the touch sensor 18. The inclination output actcalculates the inclination value indicative of the inclination of theelectronic pen 14 from the acquired first coordinate values and secondcoordinate values in accordance with calculation rules, and outputs thecalculated inclination value.

In the inclination output act (S6 and S8), the touch IC 20 then outputsan inclination value when decision conditions are satisfied. Theoutputted inclination value is different from an inclination value thatis calculated in accordance with ordinary calculation rules when thedecision conditions are not satisfied. The decision conditions representa situation where at least one of the tip electrode 30 and the upperelectrode 32 is potentially in a position interfering with theperipheries 42 and 44 or the bend 46 of the touch sensor 18 as viewedfrom above the detection surface 16. This inhibits unexpectedcalculation results from being obtained from the peripheries 42 and 44or the bend 46 of the touch sensor 18 when the inclination of theelectronic pen 14 having two electrodes is calculated.

Further, the touch IC 20 may operate in such a manner that time-seriesinclination values sequentially outputted from the peripheries 42 and 44of the touch sensor 18 during the movement of the electronic pen 14 aremore smoothed than time-series inclination values sequentially outputtedfrom the general section 48 (central portion) of the touch sensor 18.Alternatively, the touch IC 20 may operate in such a manner thattime-series inclination values sequentially outputted from the bend 46of the touch sensor 18 during the movement of the electronic pen 14 aremore smoothed than time-series inclination values sequentially outputtedfrom the general section 48 (flat portion) of the touch sensor 18.

Second Embodiment

A pen pressure value output method according to a second embodiment ofthe present disclosure will now be described with reference to FIGS. 11to 16. Elements or functions identical with those described inconjunction with the first embodiment are designated by the samereference numerals as the counterparts and may not be redundantlydescribed.

<Overall Configuration of Input System 80>

FIG. 11 is a diagram illustrating an example of an input system 80 forperforming the pen pressure value output method according to the secondembodiment of the present disclosure. The input system 80 includes theelectronic pen 14 and an electronic device 82. As is the case with thefirst embodiment, the electronic device 82 includes the touch sensor 18,the touch IC 20, and the host processor 22. However, the firmware of thetouch IC 20 is capable of implementing a pen detection function that isdifferent from the pen detection function in the first embodiment.

<Operation of Touch IC 20>

FIG. 12 is a block diagram illustrating the pen detection function ofthe touch IC 20 depicted in FIG. 11. The pen detection function isimplemented by an inclination value calculation circuit 86 and a penpressure correction circuit 88 in addition to the signal acquisitioncircuit 60 and the peak estimation circuit 62. The functions of theinclination value calculation section circuit 86 and the pen pressurecorrection section circuit 88 may be performed by the processor 26 whileprocessor 26 executes instructions stored in the memory 28. An operationperformed by the touch IC 20 while the processor 26 executesinstructions stored in the memory 28 to perform the pen detectionfunction will now be described with reference to the flowchart of FIG.13.

At S11 of FIG. 13, the signal acquisition circuit 60 acquires the firstsignal distribution and the second signal distribution from the touchsensor 18 through a scanning operation performed on each of the sensorelectrodes 18 x and 18 y. This acquisition is performed in a similarmanner as indicated at S1 of FIG. 7 and will not be described in detail.

At S12, the signal acquisition circuit 60 analyzes a downlink signalfrom the electronic pen 14, and acquires a pen pressure value indicatingthe pen pressure applied to the electronic pen 14. The pen pressurevalue correlates with the pen pressure axially applied to the electronicpen 14. For example, the pen pressure value is defined so that itincreases with an increase in the pen pressure.

FIG. 14 is a schematic diagram illustrating a part of the electronic pen14 depicted in FIG. 11. The electronic pen 14 includes a core body 36and a pen pressure sensor 38 in addition to the tip electrode 30, theupper electrode 32, and the oscillator circuit 34. The core body 36 isconnected at one end to the tip electrode 30 and at the other end to thepen pressure sensor 38. The pen pressure sensor 38 is a pressure sensorcapable of measuring the pressure that is axially applied to theelectronic pen 14. Specifically, the pen pressure sensor 38 may achievedetection by a capacitance method, a diffusion resistance method, aresistance line method, a film formation method, a deposition method, ora mechanical method.

When the electronic pen 14 is perpendicular to the detection surface 16(θ=0), the pressure applied by the user via the electronic pen 14 isentirely transmitted to the pen pressure sensor 38 as normal force fromthe detection surface 16. However, when the electronic pen 14 isinclined from the normal line of the detection surface 16 (θ ≈0), thepressure applied by the user is multiplied by approximately cosθ so thatthe resulting decreased pressure is transmitted to the pen pressuresensor 38. It should be noted that the pen pressure axially applied tothe electronic pen 14 varies with the pen inclination as describedabove.

At S13, the peak estimation circuit 62 acquires the first and secondcoordinate values by estimating the peak of each of the first and secondsignal distributions acquired at S11. This estimation is performed in asimilar manner as indicated at S2 of FIG. 7 and will not be described indetail.

At S14, the inclination value calculation circuit 86 calculates aninclination value indicative of the pen inclination by using the firstand second coordinate values acquired at S12. The inclination valuecalculation circuit 86 may calculate the inclination value in accordancewith Equation (1) above or Equation (2) above.

At S15, the pen pressure correction circuit 88 uses the inclinationvalue calculated at S14 to correct the pen pressure value acquired atS12. More specifically, the pen pressure correction circuit 88 correctsthe pen pressure value by multiplying a previous pen pressure value by acorrection multiplier M.

FIG. 15 is a diagram illustrating an example of a pen pressurecorrection property 90 used for correcting the pen pressure value. Thehorizontal axis of a graph in FIG. 15 represents the inclination angle θ(unit: degrees), whereas the vertical axis of the graph represents thecorrection multiplier M (unit: none). The pen pressure correctionproperty 90 is a function such that the correction multiplier Mmonotonically increases with an increase in the absolute value |θ| ofthe inclination angle θ. When, for example, M(θ)=secθ=1/cosθ issatisfied, M(θ)=1, M(45)=√2, and M(60)=√3 is established.

The pen pressure correction property 90 is not limited to a functionshape exemplified in FIG. 15, but may be a function shape based on themechanical structure of the electronic pen 14 or the detectionperformance of the pen pressure sensor 38. Further, pen pressure valuecorrection may be achieved by the addition of a correction amount ΔCinstead of the above-mentioned multiplication by the correctionmultiplier M.

At S16, the pen detection function supplies data including state values(e.g., coordinate values, inclination value, and corrected pen pressurevalue) indicative of the state of the electronic pen 14 to the hostprocessor 22. In this manner, the flowchart of FIG. 13 ends. The touchIC 20 is able to detect temporal changes in the state of the electronicpen 14 by performing the process of this flowchart successively atpredetermined time intervals.

Summary of Second Embodiment

As described above, the pen pressure value output method uses the inputsystem 80 that includes the electronic pen 14, which has the penpressure sensor 38 capable of measuring an axially applied pen pressure,and the electronic device 82, which has the detection surface 16 fordetecting the state of the electronic pen 14. The electronic device 82acquires an inclination value indicative of the inclination of theelectronic pen 14 from the normal line of the detection surface 16(S14), corrects a pen pressure value indicative of a pen pressuremeasured by the pen pressure sensor 38 by using the pen pressurecorrection property 90, which monotonically increases a correctionamount for the inclination value (S15), and outputs the corrected penpressure value (S16). This makes it possible to reduce the tendencywhere the value detected by the pen pressure sensor 38 relativelydecreases with an increase in the inclination of the electronic pen 14from the normal line of the detection surface 16. Consequently, theresulting pen pressure output matches the user's operation feeling ofthe electronic pen 14.

<Alternative Flowchart>

In the above example, the touch IC 20 in the electronic device 82calculates the pen pressure value (S14), corrects the pen pressure value(S15), and outputs the pen pressure value (16). However, such acts mayalternatively be performed by the electronic pen 14. When such analternative scheme is adopted, the input system 80 operates inaccordance with the flowchart depicted in FIG. 16.

The electronic device 82 acquires the first and second signaldistributions (S21), then calculates the first and second coordinatevalues (S22), and calculates the inclination value (S23). Next, theelectronic device 82 transmits an uplink signal including theinclination value calculated at S23 to the electronic pen 14. Theelectronic pen 14 acquires the inclination value included in the uplinksignal received from the electronic device 82 (S24), then acquires thepen pressure value from the pen pressure sensor 38 (S25), and correctsthe pen pressure value by using the inclination value (S26).Subsequently, the electronic pen 14 outputs the inclination valuecorrected at S26 as a downlink signal to the electronic device 82. Evenwhen the above-described configuration is adopted, it is possible toprovide advantages similar to those provided by the second embodiment,that is, obtain a pen pressure output matching the operation feeling.

Third Embodiment

A pen state detection circuit and a pen state detection method accordingto a third embodiment of the present disclosure will now be describedwith reference to FIGS. 17 to 25B. Elements or functions identical withthose described in conjunction with the first embodiment are designatedby the same reference numerals as the counterparts and may not beredundantly described.

<Overall Configuration of Input System 100>

FIG. 17 is a diagram illustrating an example of an input system 100incorporating the pen state detection circuit according to the thirdembodiment of the present disclosure. The input system 100 basicallyincludes the electronic pen 14 and an electronic device 102. Theelectronic device 102 is a foldable terminal that includes, for example,the touch sensor 18, one or more strain sensors 104, a touch IC 106functioning as the pen state detection circuit, and a host processor108.

The strain sensors 104 detect changes in the shape of the touch sensor18 that occur due to the deformation function of the electronic device102. In a case where, for example, the electronic device 102 isinflexible, the strain sensors 104 are disposed around a position wherethe touch sensor 18 bends. Meanwhile, in a case where the electronicdevice 102 is flexible, the strain sensors 104 are disposed so as tocover the entire surface of the touch sensor 18.

The touch IC 106 is an integrated circuit that includes amicrocontroller 110 having a processor 112 and a memory 114, wherein theprocessor 112 is capable of executing firmware (e.g., instructions)stored in the memory 114, and is connected to the plurality of sensorelectrodes 18 x and 18 y. The microcontroller 110 is capable ofimplementing a touch detection function and a later-described pendetection function. The touch detection function is the same as ordifferent from the touch detection function described in connection withFIG. 1.

The host processor 108 includes a CPU or a GPU, and performs similarprocessing to the processing by the host processor 22. Theabove-mentioned one or more strain sensors 104 are connected to the hostprocessor 108.

<Operation of Touch IC 106>

FIG. 18 is a block diagram illustrating the pen detection function ofthe touch IC 106 depicted in FIG. 17. The pen detection function isimplemented by a bend information acquisition circuit 120, a regiondivision circuit 122, a region determination circuit 124, a scan controlcircuit 126, and an indicated-position detection circuit 128. Thefunctions of the bend information acquisition circuit 120, regiondivision circuit 122, region determination circuit 124, scan controlcircuit 126, and indicated-position detection circuit 128 may beperformed by the processor 112 while processor 112 executes instructionsstored in the memory 114. An operation performed by the touch IC 106while the processor 112 executes instructions stored in the memory 114to perform the pen detection function 114 will now be described withreference to the flowchart of FIG. 19.

At S31 of FIG. 19, the bend information acquisition circuit 120 acquiresinformation (hereinafter referred to as “bend information”) indicativeof a bent shape of the touch sensor 18 on a periodic or non-periodicbasis from the host processor 108. Before this acquisition, the hostprocessor 108 generates the bend information regarding the touch sensor18 by using sensor signals outputted from the one or more strain sensors104.

FIG. 20 is a schematic side cross-sectional view illustrating theelectronic device 102 depicted in FIG. 17. Linearly disposed rectanglesschematically represent the sensor electrodes 18 x and 18 y (FIG. 1),which are arrayed in a planar manner. In the example of FIG. 20, theelectronic device 102, which is flat, is folded into a substantiallyZ-shape in such a manner that a part of the detection surface 16 facesoutward.

In the example of FIG. 20, the above-mentioned bend information includesinformation for identifying two bends 136 and 138. More specifically,the bend information includes “2,” which indicates the number of bends136 and 138, “coordinate values of folding lines L1 and L2,” whichindicates the positions of the bends 136 and 138, “mountain fold/valleyfold,” which indicates the orientation of the bends 136 and 138, and“bending amount,” which indicates the bending level of the bends 136 and138.

At S32, the bend information acquisition circuit 120 analyzes the bendinformation acquired at S31 to thereby determine whether or not thetouch sensor 18 is deformed. If the touch sensor 18 is not deformed(“NO” at S32), processing returns to S31, and sequentially repeats S31and S32 until the touch sensor 18 is determined to be deformed.Meanwhile, if the touch sensor 18 is determined to be deformed (“YES” atS32), processing proceeds to the next act, that is, S33.

At S33, the region division circuit 122 divides a sensor region 140 ofthe touch sensor 18 by using the bend information acquired at S31. Morespecifically, the region division circuit 122 sets a plurality ofsub-regions 141 to 144 that are partitioned by one or more bending linesidentified by the bend information.

FIGS. 21A and 21B are diagrams illustrating exemplary methods ofdividing the sensor region 140. In a case where the touch sensor 18 isfolded along two folding lines L1 and L2 as depicted in FIG. 21A, theregion division circuit 122 divides the rectangular sensor region 140into three sub-regions 141, 142, and 143 that are partitioned by the twofolding lines L1 and L2. Meanwhile, in a case where the touch sensor 18is folded along one folding line L1 as depicted in FIG. 21B, the regiondivision circuit 122 divides the rectangular sensor region 140 into twosub-regions 141 and 144 that are partitioned by one folding line L1.

At S34, the region determination circuit 124 determines one or more scanregions 146 from a plurality of sub-regions 141 to 143 divided at S33.More specifically, the region determination circuit 124 determines theone or more scan regions 146 that are adjacent to the position of thebend 136 identified by the bend information (i.e., adjacent to thefolding lines L1 and L2). Alternatively, the region determinationcircuit 124 may estimate the three-dimensional shape of the touch sensor18 from the acquired bend information, and determine a region accessibleby the electronic pen 14 (a part or whole of the sensor region 140) asthe scan region 146.

At S35, the region determination circuit 124 instructs the scan controlcircuit 126 to change the scan region 146. The scan control circuit 126then exercises drive control over the touch sensor 18 in such a manneras to scan for the electronic pen 14 in a newly determined scan region146.

Subsequently, processing returns to S31 and the process of the flowchartof FIG. 19 is repeatedly performed. In other words, the touch IC 106detects temporal changes in the state of the electronic pen 14 whiledynamically changing the scan region 146 each time the deformation ofthe touch sensor 18 is detected. Results of determination of the scanregion 146, which are dependent on various deformations of theelectronic device 102, will now be described with reference to FIGS. 22Ato 24B.

FIGS. 22A and 22B are diagrams illustrating a first exemplary result ofdetermination of the scan region 146. As depicted in FIG. 22A, whenmountain-folded along the folding line L1 and valley-folded along thefolding line L2, the electronic device 102 is deformed into asubstantially Z-shape as viewed laterally. Stated differently, in afirst deformation state, only a part (exposed portion 131) of thedetection surface 16 is exposed. In this case, as depicted in FIG. 22B,one sub-region 141 corresponding to the exposed portion 131 isdetermined as the scan region 146.

FIGS. 23A and 23B are diagrams illustrating a second exemplary result ofdetermination of the scan region 146. As depicted in FIG. 23A, whenvalley-folded along the folding line L1 and mountain-folded along thefolding line L2, the electronic device 102 is deformed into asubstantially S-shape as viewed laterally. Stated differently, in asecond deformation state, only a part (exposed portion 133) of thedetection surface 16 is exposed. In this case, as depicted in FIG. 23B,one sub-region 143 corresponding to the exposed portion 133 isdetermined as the scan region 146.

FIGS. 24A and 24B are diagrams illustrating a third exemplary result ofdetermination of the scan region 146. As depicted in FIG. 24A, theelectronic device 102 is bent into an L-shape when mountain-folded alongthe folding line L1, and bent into an L-shape when mountain-folded alongthe folding line L2. As a result, the electronic device 102 is deformedinto a substantially C-shape as viewed laterally. Stated differently, ina third deformation state, the whole of the detection surface 16(exposed portions 131, 132, and 133) is exposed. In this case, asdepicted in FIG. 24B, three sub-regions 141 to 143 corresponding to theexposed portions 131 to 133 are determined as the scan region 146.

Summary of Third Embodiment

As described above, the touch IC 106 is a pen state detection circuitthat is connected to the touch sensor 18 of a capacitance type andadapted to detect the state of the electronic pen 14 in accordance withan output signal from the touch sensor 18. The touch sensor 18 can bebent or curved at two or more points and configured such that theplurality of sensor electrodes 18 x and 18 y are disposed in a planarmanner. The touch IC 106 acquires bend information including theinformation regarding the bends 136 and 138 of the touch sensor 18(S31), determines the one or more scan regions 146 adjacent to thepositions of the bends 136 and 138 identified by the bend information(adjacent to the folding lines L1 and L2), which are in the sensorregion 140 of the touch sensor 18 (S34), and exercises drive controlover the touch sensor 18 in such a manner as to scan for the electronicpen 14 in only the determined scan region 146.

The above-described configuration makes it possible to determine thescan region 146 suitable for the bent shape of the touch sensor 18. As aresult, scanning is executed more frequently than when the entire sensorregion 140 is constantly scanned. This provides improved response in thedetection of the electronic pen 14.

Further, information regarding bend directions associated with thepositions of the bends 136 and 138 may be included as positioninformation, and the touch IC 106 may use the positions and the benddirections of the bends 136 and 138 identified by the bend informationto thereby estimate the exposed portions 131 to 133 of the touch sensor18 that are accessible by the electronic pen 14, and determine thesub-regions 141 to 143 corresponding to the exposed portions 131 to 133as the scan region 146. This ensures that unexposed regions, which areunlikely to be used due to the current shape of the touch sensor 18, areexcluded from the scan region 146.

<Modifications of Scanning Operation>

[1] The above-described scan control is applicable not only to theelectronic pen 14, but also to various types of dielectrics includingthe finger F of the user. For example, the touch IC 106 may acquire thebend information including the information regarding the positions ofthe bends 136 and 138 of the touch sensor 18, determine the one or morescan regions 146 adjacent to the positions of the bends 136 and 138identified by the bend information, which are in the sensor region 140of the touch sensor 18, and exercise drive control over the touch sensor18 in such a manner as to scan only the determined scan region 146 todetermine whether the detection surface 16 is touched by the user.

[2] Further, the scan control circuit 126 may scan the whole of thedetermined scan region 146 or temporarily stop the scanning of a part ofthe determined scan region 146. As an example of the latter case, thescan control circuit 126 may change the scan control in accordance withthe results of detection of the electronic pen 14 by theindicated-position detection circuit 128.

FIGS. 25A and 25B are diagrams illustrating an example of an alternativescanning operation performed by the scan control circuit 126. In thisexample, the electronic device 102 is deformed into a substantiallyC-shape as viewed laterally, as is the case with FIG. 24A. Stateddifferently, the touch sensor 18 is bent in such a manner that a pair ofexposed portions 131 and 133 face in opposite directions.

As depicted in FIG. 25A, while the electronic pen 14 is detected byneither of the exposed portions 131 and 132, the scan control circuit126 continuously scans all the sub-regions 141 to 143 included in thescan region 146. By contrast, as depicted in FIG. 25B, while theelectronic pen 14 is detected by only one exposed portion 131, the scancontrol circuit 126 temporarily stops the scanning of the sub-region 143corresponding to the other exposed portion 133.

As described above, while the electronic pen 14 is detected only in onesub-region 141 among a pair of sub-regions 141 and 143 corresponding tothe pair of exposed portions 131 and 133 in a case where the touchsensor 18 is bent or curved in such a manner that the pair of exposedportions 131 and 133 face in opposite directions, the scan controlcircuit 126 of the touch IC 106 may exercise drive control over thetouch sensor 18 in such a manner as to temporarily stop the scanning forthe electronic pen 14 in the other sub-region 143.

[3] Moreover, in order to exercise scan control suitable for the stateof the electronic device 102, the bend information acquisition circuit120 may not only detect a state where deformation caused by bending iscompleted, but also detect an intermediate state where the deformationis in progress or detect temporal changes in the shape. For example, thetouch IC 106 may disable the detection of a user's touch on thedetection surface 16 while the electronic device 102 is being deformed.This inhibits the electronic device 102 from performing an operation notintended by the user even in a case where the finger F touches thedetection surface 16 during a user's bending operation. Specifically,the above-mentioned “disabling of detection” is accomplished by (1)stopping detection by temporarily stopping the scanning in the scanregion 146, (2) refraining from supplying relevant position informationto the host processor 108 even when a touch is detected in the scanregion 146, or (3) supplying the position information regarding a touchas well as a disable flag indicative of disabled detection to the hostprocessor 108.

It is to be noted that the embodiments of the present disclosure are notlimited to the foregoing embodiments, and that various changes can bemade without departing from the spirit of the present disclosure.

What is claimed is:
 1. A pen state detection circuit that is connectedto a touch sensor of a capacitance type and adapted to detect a state ofan electronic pen in accordance with an output signal from the touchsensor, the touch sensor including a plurality of sensor electrodesdisposed in a planar manner, the electronic pen including a firstelectrode and a second electrode, the pen state detection circuitincluding: a processor; and a memory storing instructions that, whenexecuted by the processor, cause the pen state detection circuit tosequentially and repeatedly: acquire first coordinate values and secondcoordinate values in a sensor coordinate system, the sensor coordinatesystem being defined on a detection surface of the touch sensor, thefirst coordinate values indicating a projected position of the firstelectrode, the second coordinate values indicating a projected positionof the second electrode; calculate an inclination value indicative of aninclination of the electronic pen from the acquired first coordinatevalues and second coordinate values in accordance with calculationrules; and output the inclination value, wherein time-series inclinationvalues sequentially outputted when the electronic pen is positioned at aperiphery or a bend of the touch sensor during movement of theelectronic pen are smoothed to a greater extent than time-seriesinclination values sequentially outputted when the electronic pen ispositioned at a central portion of the touch sensor.
 2. The pen statedetection circuit according to claim 1, wherein the time-seriesinclination values sequentially outputted when the electronic pen ispositioned at the periphery or the bend of the touch sensor duringmovement of the electronic pen are smoothed by multiplying a currentinclination value by a first quantity, multiplying a previousinclination value by a second quantity, and summing the currentinclination value multiplied by the first quantity and the previousinclination value multiplied by second quantity.
 3. The pen statedetection circuit according to claim 2, wherein the second quantity isgreater than zero and less than one, and wherein the first quantity isequal to one minus the second quantity.
 4. The pen state detectioncircuit according to claim 3, wherein a value of the second quantity isgreater when the electronic pen is positioned at the periphery or thebend of the touch sensor during movement of the electronic pen than whenthe electronic pen is positioned at the central portion of the touchsensor.
 5. The pen state detection circuit according to claim 1, whereinthe time-series inclination values sequentially outputted when theelectronic pen is positioned at the periphery or the bend of the touchsensor during movement of the electronic pen are smoothed by multiplyinga current inclination value by a first quantity, multiplying each of aplurality of previous inclination values by a second quantity, andsumming the current inclination value multiplied by the first quantityand each of the previous inclination values multiplied by secondquantity.
 6. A pen state detection circuit that is connected to a touchsensor of a capacitance type and adapted to detect a state of anelectronic pen in accordance with an output signal from the touchsensor, the touch sensor including a plurality of sensor electrodesdisposed in a planar manner and being bendable or curvable at aplurality of points, the pen state detection circuit including: aprocessor; and a memory storing instructions that, when executed by theprocessor, cause the pen state detection circuit to sequentially andrepeatedly: acquire bend information including information identifying aposition of a bend of the touch sensor; determine one or more scanregions that are in a sensor region of the touch sensor and adjacent tothe position of the bend identified by the bend information; and controldriving of the touch sensor such that a scan for the electronic pen isperformed in only the one or more scan regions that are in the sensorregion of the touch sensor and adjacent to the position of the bendidentified by the bend information.
 7. The pen state detection circuitaccording to claim 6, wherein the information identifying the positionof the bend includes information identifying a bend direction associatedwith the position of the bend, and the one or more scan regions aredetermined by estimating an exposed portion of the touch sensor that isaccessible by the electronic pen using the position and the benddirection of the bend identified by the bend information, anddetermining a sub-region corresponding to the exposed portion of thetouch sensor as the one or more scan regions.
 8. The pen state detectioncircuit according to claim 7, wherein, while the electronic pen isdetected only in one of a pair of sub-regions corresponding to a pair ofexposed portions of the touch sensor in a case where the touch sensor isbent or curved in such a manner that the pair of exposed portions facein opposite directions, the driving of the touch sensor is performed insuch a manner as to temporarily stop scanning for the electronic pen ina sub-region other than the one or more scan regions that are in thesensor region of the touch sensor and adjacent to the position of thebend identified by the bend information.
 9. The pen state detectioncircuit according to claim 6, wherein the bend information includesinformation identifying a plurality of positions of a plurality of bendsof the touch sensor, and wherein the one or more scan regions isdetermined to include a plurality of scan regions adjacent to thepositions of the bends identified by the bend information.
 10. The penstate detection circuit according to claim 6, wherein the bendinformation includes information identifying a plurality of positions ofa plurality of bends of the touch sensor, and wherein the one or morescan regions is determined to include only one scan region adjacent toone of the positions of one of the bends identified by the bendinformation.
 11. A method performed by a pen state detection circuitthat is connected to a touch sensor of a capacitance type and adapted todetect a state of an electronic pen in accordance with an output signalfrom the touch sensor, the touch sensor including a plurality of sensorelectrodes disposed in a planar manner and being bendable or curvable ata plurality of points, the method including sequentially and repeatedly:acquiring bend information including information identifying a positionof a bend of the touch sensor; determining one or more scan regions thatare in a sensor region of the touch sensor and adjacent to the positionof the bend identified by the bend information; and controlling drivingof the touch sensor such that a scan for the electronic pen is performedin only the one or more scan regions that are in the sensor region ofthe touch sensor and adjacent to the position of the bend identified bythe bend information.
 12. The method according to claim 11, wherein theinformation identifying the position of the bend includes informationidentifying a bend direction associated with the position of the bend,and the determining includes estimating an exposed portion of the touchsensor that is accessible by the electronic pen using the position andthe bend direction of the bend identified by the bend information, anddetermining a sub-region corresponding to the exposed portion of thetouch sensor as the one or more scan regions.
 13. The method accordingto claim 12, wherein, while the electronic pen is detected only in oneof a pair of sub-regions corresponding to a pair of exposed portions ofthe touch sensor in a case where the touch sensor is bent or curved insuch a manner that the pair of exposed portions face in oppositedirections, the driving of the touch sensor includes temporarilystopping scanning for the electronic pen in a sub-region other than theone or more scan regions that are in the sensor region of the touchsensor and adjacent to the position of the bend identified by the bendinformation.
 14. The method according to claim 11, wherein the bendinformation includes information identifying a plurality of positions ofa plurality of bends of the touch sensor, and wherein the determiningincludes determining a plurality of scan regions adjacent to thepositions of the bends identified by the bend information.
 15. Themethod according to claim 11, wherein the bend information includesinformation identifying a plurality of positions of a plurality of bendsof the touch sensor, and wherein the determining includes determiningonly one scan region adjacent to one of the positions of one of thebends identified by the bend information.